/* components/chat-item/chat-item.wxss */
@import "/assets/iconfont/iconfont.wxss";
@import "/assets/common.less";
.chat-item{
  position: relative;
  margin-bottom: 30rpx;
}
.user-content{
  display: flex;
  justify-content: flex-end;
  width: 100%;
  box-sizing: border-box;
  .user-text{
    position: relative;
    max-width: 80%;
    background: #fff;
    border-radius: 6rpx;
    padding: 16rpx 20rpx;
    font-size: 14px;
    color: #000;
  }
}
.aispire-content{
  position: relative;
  margin-top: 30rpx;
}
.think-box{
  position: relative;
  background: #fff;
  border-radius: 6rpx;
  padding: 10rpx 20rpx;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #777;
  .iconfont{
    font-size: 20px;
    margin-right: 10rpx;
  }
  .icon-duigouwancheng{
    color: #5C83E7;
  }
}

// AI生成提示
.ai-disclaimer {
  margin-top: 16rpx;
  padding: 8rpx 12rpx;
  background: transparent;
  border-radius: 4rpx;
  font-size: 24rpx;
  color: #999;
  text-align: center;
}

// 参考资料触发按钮
.reference-trigger {
  display: inline-flex;
  align-items: center;
  background: #5C83E7;
//   border: 1rpx solid #e9ecef;
  border-radius: 20rpx;
  padding: 8rpx 16rpx;
  margin-top: 16rpx;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &:active {
    background: #e9ecef;
    transform: scale(0.98);
  }
  
  .iconfont {
    font-size: 24rpx;
    color: #5C83E7;
    margin-right: 8rpx;
  }
  
  .reference-trigger-text {
    font-size: 24rpx;
    color: #FFFFFF;
  }
}

// 参考资料悬浮层
.reference-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  
  .reference-modal-content {
    width: 90%;
    max-width: 600rpx;
    max-height: 80vh;
    background: #fff;
    border-radius: 16rpx;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    
    .reference-header {
      display: flex;
      align-items: center;
      padding: 24rpx;
      border-bottom: 1rpx solid #f0f0f0;
      background: #f8f9fa;
      
      .iconfont {
        font-size: 32rpx;
        color: #5C83E7;
        margin-right: 12rpx;
      }
      
      .reference-title {
        flex: 1;
        font-size: 32rpx;
        font-weight: 600;
        color: #333;
      }
      
      .reference-close {
        font-size: 40rpx;
        color: #999;
        width: 40rpx;
        height: 40rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        
        &:active {
          color: #666;
        }
      }
    }
    
    .reference-list {
      max-height: 60vh;
      overflow-y: auto;
      padding: 16rpx;
      
      .reference-item {
        display: flex;
        align-items: center;
        background: #f8f9fa;
        border-radius: 12rpx;
        padding: 20rpx;
        margin-bottom: 16rpx;
        transition: all 0.3s ease;
        
        &:last-child {
          margin-bottom: 0;
        }
        
        &:active {
          transform: scale(0.98);
          background: #e9ecef;
        }
        
        .reference-content {
          flex: 1;
          display: flex;
          flex-direction: column;
          
          .reference-item-title {
            font-size: 28rpx;
            font-weight: 600;
            color: #333;
            margin-bottom: 8rpx;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          
          .reference-item-source {
            font-size: 24rpx;
            color: #5C83E7;
            margin-bottom: 8rpx;
            word-break: break-all;
          }
          
          .reference-item-preview {
            font-size: 24rpx;
            color: #666;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
        
        .reference-arrow {
          margin-left: 16rpx;
          
          .iconfont {
            font-size: 24rpx;
            color: #ccc;
          }
        }
      }
    }
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100rpx);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

// 论文列表卡片样式
.paper-list {
  .paper-item {
    display: flex;
    background: #f8f9fa;
    border-radius: 12rpx;
    padding: 20rpx;
    margin-bottom: 20rpx;
    transition: all 0.3s ease;
    
    &:last-child {
      margin-bottom: 0;
    }
    
    &:active {
      transform: scale(0.98);
      background: #e9ecef;
    }
    
    .paper-index {
      font-size: 32rpx;
      font-weight: 600;
      color: #5C83E7;
      margin-right: 16rpx;
      min-width: 60rpx;
    }
    
    .paper-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      
      .paper-title {
        font-size: 28rpx;
        font-weight: 600;
        color: #333;
        margin-bottom: 12rpx;
        line-height: 1.5;
      }
      
      .paper-info {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 12rpx;
        
        text {
          font-size: 24rpx;
          color: #666;
          margin-right: 16rpx;
          margin-bottom: 4rpx;
        }
        
        .paper-authors {
          color: #5C83E7;
        }
        
        .paper-citations {
          color: #FF3630;
          font-weight: 500;
        }
      }
      
      .paper-abstract {
        font-size: 24rpx;
        color: #666;
        line-height: 1.6;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 12rpx;
      }
      
      .paper-url {
        display: inline-flex;
        align-items: center;
        color: #5C83E7;
        font-size: 24rpx;
        
        .iconfont {
          font-size: 24rpx;
          margin-right: 8rpx;
        }
      }
    }
  }
}

